home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / board / AmiGo.lha / AmiGo / go.h < prev    next >
C/C++ Source or Header  |  1989-12-12  |  1KB  |  45 lines

  1. /* AmiGo Include */
  2. /* MSG types for getinput() */
  3. #define INTERSECTIONMSG 1    /* User buttoned an intersection */
  4. #define QUITMSG 2        /* User buttoned QUIT icon */
  5. #define PLAYMSG 3
  6. #define RESTARTMSG 4
  7. #define PASSMSG 5
  8.  
  9. #define TRUE 1
  10. #define FALSE 0
  11.  
  12. #define MAXGROUPS 100
  13.  
  14. #define PLACED 0
  15. #define REMOVED 1
  16.  
  17. #define numPoints 19
  18. #define maxPoint numPoints - 1
  19.  
  20. enum bVal {BLACK, WHITE, EMPTY};
  21. typedef enum bVal sType;
  22. struct Group
  23. {
  24.    enum bVal color;    /* The color of the group */
  25.    short code,        /* The code used to mark stones in the group */
  26.          count,        /* The number of stones in the group */
  27.          internal,    /* The number of internal liberties */
  28.          external,    /* The number of external liberties */
  29.      liberties,    /* The total number of liberties */
  30.          eyes,        /* The number of eyes */
  31.          alive,        /* A judgement of how alive this group is */
  32.          territory;    /* The territory this group controls */
  33. };
  34.  
  35. struct bRec
  36. {
  37.    enum bVal Val;    /* What is at this intersection */
  38.    short xOfs, yOfs;
  39.    short mNum;
  40.    short GroupNum;    /* What group the stone belongs to */
  41.    short marked;    /* TRUE or FALSE */
  42. };
  43.  
  44.  
  45.